#ifndef __IPACKAGE_H__
#define __IPACKAGE_H__

class IPackage
{
protected:
	void *lib_handle;
public:
	IPackage()					{}
	virtual ~IPackage()			{}

	virtual s32 PackageStart()
	{
		return 0;
	}

	virtual s32 PackageEnd()
	{
		return 0;
	}

	virtual s32 PackageUpdate()
	{
		return 0;
	}

	virtual s32 PackagePause()
	{
		return 0;
	}

	virtual s32 PackageUnPause()
	{
		return 0;
	}

	virtual stringc GetPackageName()
	{
		return "DummyPackage";
	}

	virtual stringc GetPackageDescription()
	{
		return "This is a dummy package. You should override this function in order to create your own package";
	}

	virtual u32 GetVer()		{	return 0;	}
	virtual u32 GetSubVer()		{	return 0;	}
	virtual u32 GetRev()		{	return 0;	}

};

typedef IPackage *GetNewPackageInstance();
typedef IPackage *GetPackage();
typedef IPackage *DestroyPackageInstance();

typedef struct IPackageData
{
	IPackageData()
	{
		lib_handle = NULL;
		Package = NULL;
		gnpi = NULL;
		gp = NULL;
		dpi = NULL;
		id = -1;
	}

	void *lib_handle;
	IPackage *Package;
	GetNewPackageInstance *gnpi;
	GetPackage *gp;
	DestroyPackageInstance *dpi;
	s32 id;
} IPackageData;

#endif
